//
//  YHPartCell.swift
//  SortProject
//
//  Created by ALH000355 on 2022/8/30.
//

import UIKit
import SnapKit
class YHPartCell: UICollectionViewCell {
    public var title: String = "" {
        didSet {
            titleLb.text = title
        }
    }
    private var titleLb: UILabel!
    func uiConfig() -> Void {
        titleLb = UILabel.init()
        contentView.addSubview(titleLb)
        titleLb.textColor = .white
        titleLb.font = .systemFont(ofSize: 12)
        titleLb.snp.makeConstraints { make in
            make.left.top.bottom.equalTo(3)
        }
    }
    override init(frame: CGRect) {
        super.init(frame: frame)
        uiConfig()
        self.contentView.layer.cornerRadius = 5
        self.contentView.layer.masksToBounds = true
        self.contentView.backgroundColor = UIColor(red: CGFloat((arc4random() % 255)) / 255.0, green: CGFloat((arc4random() % 255)) / 255.0, blue: CGFloat((arc4random() % 255)) / 255.0, alpha: 1)
    }
    required init?(coder: NSCoder) {
        super.init(coder: coder)
    }
}
